import request from '@/request/index.js';

/**
 * 查询设备台账盘点列表(若依自带)
 */
export const inventoryList = (params) => {
	return request.get({
		url: '/device/inventory/h5DataList',
		data: params,
	});
};
/**
 * 根据任务id获取该任务的设备所在位置树
*/ 
export const partitionTree = (params) => {
	return request.get({
		url: '/device/inventory/partitionTreeH5',
		data: params,
	});
};
/**
 *  根据位置搜索位置
**/ 

export const getRecordByPartitionId = (params) => {
	return request.get({
		url: '/device/inventory/getRecordByPartitionId',
		data: params,
	});
};
/**
 * 获取设备台账盘点详细信息(若依自带)
 * 
*/ 
export const inventoryGetInfo = (params) => {
	return request.get({
		url: '/device/inventory/getInfo',
		data: params,
	});
};
/**
 *   提交盘点
 * 
*/ 
export const submitRecord  = (params) => {
	return request.post({
		url: '/device/inventory/submitRecord',
		data: params,
	});
};
/**
 *     提交盘点完成
**/ 
export const inventoryOver  = (params) => {
	return request.post({
		url: '/device/inventory/inventoryOver',
		data: params,
	});
};
// 扫码code 获取设备数量 
export const getDataByDeviceCode  = (params) => {
	return request.post({
		url: '/device/inventory/getDataByDeviceCode',
		data: params,
	});
};